package deng.qiya.util;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DateHelper {
	
	private static Logger logger = LoggerFactory.getLogger(DateHelper.class);

	public static Date getDate(String dateStr){
		Date date = null;
		DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		try {
			date = df.parse(dateStr);
		} catch (ParseException e) {
			logger.warn(e.getMessage());
			e.printStackTrace();
		}
		return date;
	}
}
